package com.mzhmxh.util;


import org.springframework.stereotype.Component;

/**
 * @Author LiJinCheng
 * @Date 2020/6/13 6:40 下午
 * @Version 1.0
 * @package com.example.demo.util
 **/
@Component
public class NumUtil {
    public static java.util.Random R = new java.util.Random();
    private static char[] letter = {
            'a','b','c','d','e',
            'f','g','h','i','j',
            'k','l','m','n','o',
            'p','q','r','s','t',
            'u','v','w','x','y','z'
    };

    public static String nextCapitalLetter(){
        return String.valueOf(Character.toUpperCase(letter[R.nextInt(26)]))+ String.valueOf(Character.toUpperCase(letter[R.nextInt(26)]));
    }

    public static String nextNumberString(String digit){
        String numberString = "";
        for(int i = 0;i < Integer.valueOf(digit);i++){
            numberString +=	R.nextInt(10);
        }
        return numberString;
    }
}
